//
// Created by yym on 2019/11/8.
//
#include <jni.h>
#include <string>
#include <android/log.h>

#ifndef NDKAUTHSIGNATURE_SIGNATURE_H
#define NDKAUTHSIGNATURE_SIGNATURE_H

#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "========= Debug =========", __VA_ARGS__);
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, "========= Info =========", __VA_ARGS__);
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "========= Error =========", __VA_ARGS__);

class signature {

private:
    //获取签名信息
    static const char* getSha1(JNIEnv *env, jobject context_object);
public:
    //校验签名信息
    static void authSignature(JNIEnv *env,jobject ctx);

    //抛出异常
    static void ThrowNDKException(JNIEnv * env,const char * className,const char * message);
};


#endif //NDKAUTHSIGNATURE_SIGNATURE_H
